<ui:composition template="/WEB-INF/templates/template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">

	<ui:define name="conteudo">
		<h:form id="form">
			<p:panel id="panel" header="Cadastro de Usuario">
				<h:inputHidden value="#{userBean.user.id}" />
				<h:panelGrid columns="3">
					<p:outputLabel value="Nome: " for="nome" />
					<p:inputText id="nome" value="#{userBean.user.nome}"
						required="true" />
					<p:message for="nome" />
					
					<p:outputLabel value="Senha: " for="senha" />
					<p:inputText id="senha" value="#{userBean.user.senha}" />
					<p:message for="senha" />
					
				</h:panelGrid>
				<p:commandButton value="Cadastrar"
					actionListener="#{userBean.add}" update="form" />
			</p:panel>
		</h:form>

	</ui:define>
</ui:composition>